#ifndef CODEPROCESSOR_H
#define CODEPROCESSOR_H

#include <QString>
#include <QStringList>
#include <QMap>
#include <QSet>

class CodeProcessor
{
public:
    static bool isSourceFile(const QString &filePath, const QStringList &languages);
    static QString removeCommentsAndEmptyLines(const QString &sourceCode, const QString &language);
    static QString getLanguageByExtension(const QString &filePath);
    static QStringList splitToPages(const QString &code, int linesPerPage = 50);
    static QStringList getSupportedLanguages();
    static QStringList getExtensionsForLanguage(const QString &language);
    
private:
    static const QMap<QString, QStringList> languageExtensions;
    static QString removeCppStyleComments(const QString &sourceCode);
    static QString removePythonStyleComments(const QString &sourceCode);
    static QString removeHtmlStyleComments(const QString &sourceCode);
};

#endif // CODEPROCESSOR_H 